package semspe;
import javax.swing.*;
import java.awt.event.*;

class VisuStock extends JFrame implements ActionListener//implements WindowListener
{
	private JPanel panel;
	
	
	
	private JOptionPane jop1;
	private JButton OK;
	private JButton annuler;
	
	public VisuStock()
	{
		super("Visualiser un stock");
		this.setSize(400,600);
		this.setResizable(false);
		this.setVisible(true);
		
		this.getContentPane().setLayout(null);
		this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		
		this.panel = new JPanel();
		//Numero Stock
		
		
		//BUT
		this.OK = new JButton("Ajouter");
		this.getContentPane().add(this.OK);
		this.OK.setBounds(100,400,100,20);
		this.annuler = new JButton("Annuler");
		this.getContentPane().add(this.annuler);
		this.annuler.setBounds(250,400,100,20);
		
		this.annuler.addActionListener(this);
		this.OK.addActionListener(this);
		
		jop1 = new JOptionPane();
		
		
	}
	

	public void actionPerformed(ActionEvent evt) {
			if(evt.getSource() == annuler)
			this.dispose();
			else if(evt.getSource() == OK)
                        this.dispose();			
	}                

	
	public static void main (String[] a)
	{
		VisuStock voirStock = new VisuStock();
	}
	
} 
